<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>{if !empty($share_data['sname'])}{$share_data['sname']}{else}拼团商城{/if}</title>
	    {php echo register_jssdk();}
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
		<meta name="format-detection" content="telephone=no">
		<meta http-equiv="Pragma" content="no-cache">
		<meta http-equiv="Cache-Control" content="no-store">
		<meta http-equiv="Expires" content="0">
		<link rel="stylesheet" href="../addons/feng_fightgroups/template/css/style_826b4a.css">
		<link rel="stylesheet" href="../addons/feng_fightgroups/template/css/font-awesome.css">
		<link type="text/css" rel="stylesheet" href="../addons/feng_fightgroups/template/css/style.css?{TIMESTAMP}">
		<LINK href="../addons/feng_fightgroups/template/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">
		<style type="text/css">
		.ht{margin:0 0 10px}
		.ht_tit{height:36px;line-height:36px;padding:0 10px}
		.ht_list{font-size:12px;border:1px solid #D5D5D5;background-color:#fff;border-left:0 none;border-right:0 none}
		.ht_item{position:relative;padding:15px 10px;padding-left:50px;border-bottom:1px solid #E3E3E3}
		.ht_item:last-child{border-bottom:0px none}
		.ht_avatar{position:absolute;top:15px;left:10px}
		.ht_avatar img{display:block;width:30px;height:30px;overflow:hidden;-webkit-border-radius:30px;border-radius:30px;background-clip:padding-box}
		.ht_info{white-space:nowrap;margin-bottom:7px}
		.ht_info:after{content:'';display:block;clear:both;height:0;visibility:hidden}
		.ht_name{float:left;color:#333;margin-right:10px}
		.ht_time{float:right}
		.ht_btn{display:block;clear:both;height:28px;line-height:28px;-webkit-border-radius:3px;border:1px solid #F0373D;overflow:hidden}
		.ht_price{float:left;width:95px;background-color:#fff;text-align:center;font-size:14px;height:28px;line-height:28px;color:#666}
		.ht_price i{font-size:12px}
		.ht_btn_go{float:right;width:150px;background-color:#F0373D;text-align:center;color:#fff}
		</style>
		<script src="../addons/feng_fightgroups/template/js/hm.js" language="javascript"></script>
		<script src="../addons/feng_fightgroups/template/js/jquery.min.js" language="javascript"></script>
        <script  src="../addons/feng_fightgroups/template/js/touchslider.min.js" language="javascript"></script>
        <script language="javascript" src="../addons/feng_fightgroups/template/js/swipe.js"></script>
        <script id="b5mmain" type="text/javascript" charset="utf-8" src="../addons/feng_fightgroups/template/js/b5m.main.js">
        <script type='text/javascript' src='../addons/feng_fightgroups/template/js/jquery-1.11.1.min.js'></script>
    </head>
	<body>
	<div id="banner_box" class="box_swipe" >
			    <ul>
			        {loop $advs $adv}
			        <li>
			            <a href="{if empty($adv['link'])}#{else}{$adv['link']}{/if}">
			                <img src="{php echo tomedia($adv['thumb']);}" style='width:100%;height: 12rem;'/>
			            </a>
			            
			        </li>
			        {/loop}

			    </ul>
			    <ol>
			       {php $slideNum = 1;}
			    {loop $advs $adv}
			        <li{if $slideNum == 1} class="on"{/if}></li>
			        {php $slideNum++;}
			    {/loop}
			    </ol>
			</div>
			
			<script>
			    $(function() {
			        new Swipe($('#banner_box')[0], {
			            speed:500,
			            auto:3000,
			            callback: function(){
			                var lis = $(this.element).next("ol").children();
			                lis.removeClass("on").eq(this.index).addClass("on");
			            }
			        });
			    });
			</script>
		<div class="" style="padding: 0;overflow-x: hidden;" >

			<section class="main-view" data-unuse="1" >
				<div class="tm" data-unuse="1">
					<div class="td2" data-unuse="1">
						<div class="td2_name" data-unuse="1">{$goods['gname']}</div>
						<div class="td2_cx" data-unuse="1">{$goods['gdesc']}</div>
						<div class="td2_info" data-unuse="1">
							<div class="td2_price" data-unuse="1">市场价：<b id="market_price">¥{$goods['mprice']}</b> <span>已售：<i id="sold_quantity">{$goods['salenum']}</i>件</span>
							</div>
							<div class="td2_num" data-unuse="1">支付开团并邀请<span id="tuan_more_need_number">{php echo (intval($goods['groupnum'])-1)}</span>人参团，人数不足可以退款，详见下方拼团玩法</div>
						</div>
					</div>
					<div class="kt" data-unuse="1">
						<a id="tuan_more_btn" class="kt_item" href="{php echo $this->createMobileUrl('orderconfirm',array('groupnum'=>$goods['groupnum'],'id'=>$goods['id'],'tuan_id'=>$tuan_id));}">
							<div class="kt_price" data-unuse="1"><b id="tuan_more_price">¥{$goods['gprice']}</b><i> / </i>件</div>
							<div class="kt_btn" data-unuse="1"><b id="tuan_more_number">
								成为团长并开团
							</b>
							</div>
						</a>
						<a id="tuan_more_btn" class="kt_item" href="{php echo $this->createMobileUrl('orderconfirm',array('groupnum'=>1,'id'=>$goods['id'],'tuan_id'=>$tuan_id));}" style="background-color: #E49047;">
							<div class="kt_price" data-unuse="1"><b id="tuan_one_price">¥{$goods['oprice']}</b><i> / </i>件</div>
							<div class="kt_btn" id="tuan_one_number" data-unuse="1">单独购买</div>
						</a>
					</div>
				</div>
				{if !empty($tuan_ids)}
				<div id="more_tuan">
				<div class="ht">
					<div class="ht_tit">以下小伙伴正在发起团购，您可以直接参与</div>
					<div class="ht_list">
					{loop $tuan_ids $order}
					<div class="ht_item">
						<div class="ht_avatar"><img src="{$order['avatar']}" alt="团长头像"></div>
						<div class="ht_info"><div class="ht_name">{$order['nickname']}</div><div class="ht_time">发起时间：{php echo date('Y-m-d H:i:s', $order['ptime']);}</div></div>
						<a href="{php echo $this->createMobileUrl('group',array('tuan_id'=>$order['id']));}" class="ht_btn" ptag="20400.7.1"><span class="ht_price"><i>¥</i>{$goods['gprice']} / 件</span><span class="ht_btn_go">差{$order['snumber']}人成团，火速参团 》</span></a>
					</div>
					{/loop}
					</div>
				</div>
				</div>
				{/if}
				<div class="step" data-unuse="1">
					<div class="step_hd" data-unuse="1">
						拼团玩法<a class="step_more" href="{php echo $this->createMobileUrl('rules');}">查看详情</a>
					</div>
					<div id="footItem" class="step_list" data-unuse="1">
						<div class="step_item step_item_on" data-unuse="1">
							<div class="step_num" data-unuse="1">1</div>
							<div class="step_detail" data-unuse="1">
								<p class="step_tit">选择
									<br>心仪商品</p>
							</div>
						</div>
						<div class="step_item " data-unuse="1">
							<div class="step_num" data-unuse="1">2</div>
							<div class="step_detail" data-unuse="1">
								<p class="step_tit">支付开团
									<br>或参团</p>
							</div>
						</div>
						<div class="step_item " data-unuse="1">
							<div class="step_num" data-unuse="1">3</div>
							<div class="step_detail" data-unuse="1">
								<p class="step_tit">邀请好友
									<br>参团支付</p>
							</div>
						</div>
						<div class="step_item" data-unuse="1">
							<div class="step_num" data-unuse="1">4</div>
							<div class="step_detail" data-unuse="1">
								<p class="step_tit">达到人数
									<br>团购成功</p>
							</div>
						</div>
					</div>
				</div>
			</section>
		</div>
		
		
<div style="height:65px;"></div>
<FOOTER class="footer">
			<NAV>
				<UL>
					<LI>
						<A class="nav-controller" href="{php echo $this->createMobileUrl('index')}"><I 
					  class="fa fa-home"></I>首页</A>
					</LI>
					<LI>
						<A class="nav-controller" href="{php echo $this->createMobileUrl('mygroup',array('op'=>0));}"><I class="fa fa-group"></I>我的团</A>
					</LI>
					<LI>
						<A  id="myorder" class="nav-controller" href="{php echo $this->createMobileUrl('myorder',array('op' => '0'))}"><I class="fa fa-list"></I>我的订单</A>
					</LI>
					<LI>
						<A class="nav-controller" href="{php echo $this->createMobileUrl('person');}">
							<I class="fa fa-user"></I>个人中心</A>
					</LI>
				</UL>
			</NAV>
		</FOOTER>
		
	</body>

<script>
	wx.ready(function (){
	var shareData = {
		title: "{$goods['gname']}",
		desc: "{$share_data['share_desc']}",
		link: "{$to_url}",
		imgUrl: "{php echo tomedia($goods['gimg']);}",
	};
//分享朋友
	wx.onMenuShareAppMessage({
	    title: shareData.title,
	  	desc: shareData.desc,
	  	link: shareData.link,
	  	imgUrl:shareData.imgUrl,
	  	trigger: function (res) {
	  	},
	  	success: function (res) {
	    	window.location.href =adurl;
	  	},
	  	cancel: function (res) {
	  	},
	  	fail: function (res) {
	    	alert(JSON.stringify(res));
	  	}
	});
//朋友圈
	wx.onMenuShareTimeline({
	  	title: shareData.title,
	  	link: shareData.link,
	  	imgUrl:shareData.imgUrl,
	  	trigger: function (res) {
	  	},
	  	success: function (res) {
	    	window.location.href =adurl;
	  	},
	  	cancel: function (res) {
	  	},
	  	fail: function (res) {
	    	alert(JSON.stringify(res));
	  	}
	});
});
</script>
</html>